package com.wang.designpattern.prototype;

public class TestPropotype {

    public static void main(String[] args) {
        Propotype propotype1 = new Propotype("1", "www");
        Propotype propotype2 = null;
        Propotype propotype3 = null;
        propotype1.setWorkExperience("2009", "A公司");
        try {
            propotype2 = (Propotype) propotype1.clone();
            propotype2.setName("wang");
            propotype2.setWorkExperience("2015", "B公司");
            propotype3 = (Propotype) propotype1.clone();
            propotype3.setName("hui");
            propotype3.setWorkExperience("2019", "C公司");
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        propotype1.display();
        propotype2.display();
        propotype3.display();
    }
}
